\documentclass[10pt, titlepage]{report}
\usepackage{graphicx}
\begin{document}

% Title
\title{Profession Applied and Computational Mathematics Master's
Student Internship Report}
\author{Andrew O'Neill}
\date{\today}
\maketitle

% Abstract
\begin{abstract}

The Great Lakes Center is a research center based at Buffalo
State College. The project goal was to expand the existing
network of observation buoys by deploying three near-shore buoys
in areas of concern. Along with the AUV, the buoys would be
monitoring systematic changes in the water quality and
hydrodynamics. The data will be used to further validate the
FVCOM hydrodynamic forecasting model predictions of the impacts
of environmental and climate change on Lake Erie and the Great
Lakes. The Buoys are equipped with sensors that collect data on
above and below water surface features. In my internship I
created the back-end database for the buoys and AUV, quality
assurance tests to verify data is within the expected bounds, A
website to display the data, and plots of the data for easy
visualization. In this report I will discuss the solutions
implemented to complete the project.

\end{abstract}

\tableofcontents

\chapter{Introduction}

\section{Prologue}

% Indicate the general area of the internship activity. Explain
% the technical terms involved. Explain the process of selection
% of the internship and the research component.

The internship at the Great Lakes Center was centered around the
retrieval, storage, and display of data collected from buoys and
AUV.

The Autonomous Underwater Vehicle (AUV) is an autonomous
submarine that is equipped with various sensors. The database
programming made heavy use of Structured Query Language (SQL). A
trigger is a special kind of stored procedure that executes
automatically when a user attempts the specified
data-modification statement on the specified table. Baud or Baud
rate is the number of distinct signaling events made to the
transmission medium per second. The baud rate is important for
the digital communication between the sensors on the buoys if
they are different the data will not transmit correctly. Sonde is
a water quality monitoring instrument. Each buoy is equipped with
a top and bottom sonde which measure water quality near the
surface and floor respectively. YSI is a developer and
manufacturer of sensors, instruments, software, and data
collection platforms for environmental water quality monitoring
and testing. They are the company contracted to build the sensors
and buoy as well as the AUV. LoggerNet is a suite of tools used
to connect remotely to the buoys to monitor and administer
systems or collect data.

% Info about the grant the great lakes center got
% Project information
% previous work done
% goals

\section{Literature Review}

% 1.	Give a picture of what was done before, as well as the
% basis for describing what is new or important about the
% internship work and research component.
% 2.	A review is not a summary, but it is meant to be
% interpretive and critical. This literature review may not be
% synonymous with a research paper literature review and may vary
% based on the type of internship completed. This could include
% information such as best practices in the field in which the
% student is worked on.

I was brought onto the project in late January of 2012. Before I
started another intern had done work on creating a database for
the AUV data as well as a python script to load the data. The data
was gathered by the AUV from missions at different sites (lakes,
ponts). An AUV mission is a preprogrammed route that the AUV will
follow while collecting data. The missions take a couple hours to
complete. When the AUV finishes the mission the data is
downloaded to a laptop. These files are transferred to the server
via USB or through a network drive. Once the data files are on
the server they ran a python script to load them into the
database. This process had been set up by the previous intern. 

When I started the buoys were in a warehouse waiting to be
unpackaged and assembled. The sensors were unattached and had not
been tested with the buoy. The program for LoggerNet was missing
code for some sensors and incomplete on some sensors. There was
no database in place for the buoy data. 

The main focus of my internship was to create the database for
the buoys. This also involved creating QA/QC procedures for the
buoy data as well as a way to load and display the data. The goal
was to automate the data collection, loading, QA/QC, displaying
processes as much as possible.

\section{Professional Experience Section}

% 1.	Present the setting of the internship
% 2.	Discuss the activities required

Most of the work on the internship was done in the Geography and
Planning Department's GIS Lab at Buffalo State College. Due to
security restrictions, the server that the database and website
are hosted on could only be accessed on campus by students. I
used computers in the GIS Lab and Butler Library to do a remote
desktop connection to our Windows Server. A lot of my work was
done in Vim text editor. I used Vim for programming as well as
viewing and manipulating some of the data files. I also used SQL
Server Management Studio for viewing, and testing data as well as
running small SQL queries. I used R to code scripts that create
plots of the data.

I was given a user account on the server with administrative
privileges. This allowed me to work from anywhere on campus at
anytime. I was not confined to a scheduled time to work on the
project and was only requested to be available on days where we
spoke to the technical team at YSI and the testing period around
the time of deployment. Most of my time was spent programming the
scripts to load and extract data from the database. Another major
portion of my time was spent creating the QA/QC triggers in the
database. Near the deployment a lot of my time was spent
troubleshooting connection issues between the buoy and the
% FIXME add something about communication
server. This involved communication with Verizon Wireless and
YSI. 

\section{Research Component Section}

% 1.	Present the formal problem(s) for the research, showing
% how it extends, continues, or enhances what was done before,
% and why it is important within current organization trends
% 2.	Discuss or list the research questions or hypotheses, if
% any, and how the underlined problem will be studied.

Currently there exist significant gaps in the understanding of
the dynamics of lake water quality, sediment and hydrodynamics in
view environmental and climate change. To address this, the
Accountability, Education, Monitoring, Evaluation, Communication
and Partnerships focus area is an essential component for
progress in other areas of focus. The lack of investment over
recent years in research and monitoring has led to gaps in
knowledge and an inadequate understanding of complex and emerging
issues such as nearshore dynamics and climate change impacts.
The results obtained from this proposed project will yield new
advances in the predictability of ecosystem health, of lake wide
hydrodynamics and regional climate systems driven by
lake-atmosphere exchanges. Furthermore, it will improve real-time
water quality data and in-lake energy, sediment and nutrient
redistribution dynamics. These data will be used, in part, to
assess environmental change impacts and the success of
remediation initiatives in targeted AoCs. The approach we will
take in our work specifically addresses two of the seven EPA
priority areas: Climate Change and Protecting America's Waters.

\chapter{Materials and Methods}

\section{Design}

% A. Design:	Identify the types of variables studied, the
% outcomes to be examined, and the comparisons to be made.

When I started at the Great Lakes Center the initial design was
very loose. The project leaders knew they wanted a database to
hold all the buoy and AUV data. They also wanted there to be some
QA/QC checks in place. Finally they wanted a website that could
display the data collected from the buoys in a user friendly way.

The previous intern had worked on the database tables and loading
procedure for the AUV data. When I used it to load some new data
from a recent mission I noticed that the loading procedure was
not working properly. The new data files from the AUV had less
columns than the database table. We decided to look into the AUV
data file to come up with a new design for the AUV database.
Using the AUV data file and the Reference Manual provided in the
documentation, I came up with a new database table that could
mimic the AUV data files. One of the major changes was to leave
the Date and Time as separate columns and change all the data
types to float(24). The first change allowed the AUV data files
to be bulkloaded into the database, eliminating the complexities
in the load script. The second change was to do more precise math
and averages which would be important for the QA/QC. Another
major design decision was to include primary and foreign keys in
the tables. The primary key would assure that the record was
unique and that we did not accidentally insert duplicate values.

When designing the buoy database I decided the best approach was
to make separate tables for each sensor on each buoy. Since the
sensors on the buoy sample at different rates it would not make
sense to combine multiple sensors into one table. On rows where
one sensor sampled and the another did not the values would be
NULL or possibly 0, which would be worse. Each table had a
primary key that consisted of a datetime field and a record
number created by LoggerNet. I chose these fields to define
unique rows because it is possible that the datetime could be the
same for two records or that the record number could wrap around
if the sensor samples at a high rate for a long period of time.
Together they can assure uniqueness in the records.

\section{Problems}

When I first joined the Great Lakes Center the Buoys could not be
deployed because of the seasonal freezing of Lake Erie. For the
first month I worked on creating the Quality Assurance tests for
the data that was collected by the AUV. While creating these
tests I noticed an inefficiency the data load process.

\end{document}
